#include<stdio.h>
int main()
{
	int i;
	int count=0;
	int number;
	char temp;
	char s[50]="";
	gets(s);
	for(i=0;s[i]!='\0';i++)
	{
		if(s[i]>='a'&&s[i]<='z')
		    s[i]=(s[i]+3-'a')%26+'a';
		if(s[i]>='A'&&s[i]<='Z')
		    s[i]=(s[i]+3-'A')%26+'A'; 
	count++;
	}
    number=count;
	for(i=0;i<count/2;i++)
	{
	    temp=s[i];
		s[i]=s[count-1-i];
		s[count-1-i]=temp;	
	}
	for(i=0;i<number;i++)
	{		
		if(s[i]>='a'&&s[i]<='z') 
		{
			    s[i]=s[i]-32;
		}
		else if(s[i]>='A'&&s[i]<='Z') 
		    s[i]=s[i]+32;
    } 
	puts(s);
	return 0;
}
